import request from "./request";
// request 就是 那个 request.js  文件中开放出来的ins
// 轮播图
export const GetHomeList=()=>request.get("/index/index");
// 搜索历史热门
export const GetPopupdata=()=>request.get("/search/index");
// 实时搜索
export const GetSearchList=(params)=>request.get("/search/helper",{params});
// 搜索后产品展示分类
export const GetGoodsList=(params)=>request.get("/goods/list",{params});
// 删除历史记录
export const GetDelHistory=(params)=>request.post("/search/clearhistory",{params});


// 专题页
export const GetTopicList=(params)=>request.get("/topic/list",{params});

// 分类页
// 遍历大页面
export const GetTypcList=()=>request.get("/catalog/index");
// 分类的右侧的遍历
export const currentCategory=(params)=>request.get("/catalog/current",{params});

// 我的页 登录接口
export const GetUser=(params)=>request.post("/auth/loginByWeb",params);

// 首页的分裂
export const GetGoodsCategoty=(params)=>request.get("/goods/category",{params});
export const GetCategotyList=(params)=>request.get("/goods/list",{params});


// 商品详情
export const GetDetail=(params)=>request.get("/goods/detail",{params});
// 相关产品
export const GetGoodsRelated=(params)=>request.get("/goods/related",{params});

// 加入购物车
export const AddCart=(params)=>request.post("/cart/add",params);
// 获取购物车商品数量
export const CartGoodsCount=(params)=>request.post("/cart/goodscount",params);
// 遍历购物车
export const GetCartIndex=(params)=>request.get("/cart/index",params);
// 删除商品
export const GetCartDel=(params)=>request.post("/cart/delete",params);
// 选中商品
export const GetCartCheck=(params)=>request.post("/cart/checked",params);
// 商品步进器
export const GetCartUpdate=(params)=>request.post("/cart/update",params);

/* 
export const 常量名=function(){
    return request.get("/index/idnex")
}

常量名() 
*/